From ec3cf54fd2f32d3f8bff94931a7ac2c13cbc7c76 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Mon, 9 Oct 2017 14:30:06 +0100 Subject: [PATCH] libxl: set the default grant/maptrack frames at structure init MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit libxl_domain_build_info had both the maptrack and grant frames set to 0 by default, forcing the client of libxl to set a sane default. This is not backwards compatible, so instead initialize both max_grant_frames and max_maptrack_frames to a sane default (ie: like previous behavior). This fixes the libvirt tests in osstest. Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson --- tools/libxl/libxl.h | 3 +++ tools/libxl/libxl_types.idl | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index e5ef920743..f82b91e0c1 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -322,6 +322,9 @@ */ #define LIBXL_HAVE_BUILDINFO_GRANT_LIMITS 1 +#define LIBXL_MAX_GRANT_FRAMES_DEFAULT 32 +#define LIBXL_MAX_MAPTRACK_FRAMES_DEFAULT 1024 + /* * LIBXL_HAVE_BUILDINFO_* indicates that libxl_domain_build_info has * the field represented by the '*'. The original position of those diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index ade359e387..2d0bb8a222 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -480,8 +480,8 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("vnuma_nodes", Array(libxl_vnode_info, "num_vnuma_nodes")), - ("max_grant_frames", uint32), - ("max_maptrack_frames", uint32), + ("max_grant_frames", uint32, {'init_val': 'LIBXL_MAX_GRANT_FRAMES_DEFAULT'}), + ("max_maptrack_frames", uint32, {'init_val': 'LIBXL_MAX_MAPTRACK_FRAMES_DEFAULT'}), ("device_model_version", libxl_device_model_version), ("device_model_stubdomain", libxl_defbool), -- 2.30.2